package com.glink.manage.service.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : qiushaoshan
 * @create 2024/8/29 16:31
 */
@Slf4j
@Component
@Order(1)
public class LoadNotAnalysisOnStartUp implements CommandLineRunner {

    @Value("${warn.analysis.secondTime:30}")
    private Integer warnAnalysisSecondTime;
    
    @Autowired
    private AutoService autoService;
    
    public void run(String... args) throws Exception {
        log.info("项目启动时,加载未执行完的图片分析");
        autoService.startAnalysisOnStartUp();
    }
}
